package pa2.util;

public class CompInteger extends EqualityCompare<CompInteger> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6299784550013736972L;
	private Integer value;
	
	
	public CompInteger(Integer value) {
		super();
		this.value = value;
	}


	@Override
	public int compareTo(CompInteger arg0) {
		return this.value - arg0.value;
	}


	@Override
	public String toString() {
		return this.value.toString();
	}


	@Override
	public boolean equals(Object arg0) {
		if (arg0 instanceof CompInteger) {
			return this.value.equals(((CompInteger) arg0).value);
		}
		return false;
	}


	@Override
	public int hashCode() {
		int hash = 7;
		hash = 31 * hash + this.value.hashCode();
		return hash;
	}

	
}
